import { HashRouter as Router, Routes, Route } from "react-router-dom";
import "./App.css";
import Navbar from "@/components/Navbar";
import Footer from "@/components/Footer";
import Home from "./page/Home";
import QueryShop from "./page/QueryShop";
import QueryCard from "./page/QueryCard";
import CorpGuide from "./page/CorpGuide";
import Guide from "./page/Guide";
import CardYum from "./page/CardYum";
import Faq from "./page/Faq";
import RuleYum from "./page/RuleYum";
import ContractYum from "./page/ContractYum";
import Contact from "./page/Contact";

function App() {
  return (
    <>
      <Router>
        <div className="route-body">
          <Navbar />
          <Routes>
            <Route path="/" element={<Home />} />
            <Route path="/home" element={<Home />} />
            <Route path="/queryCard" element={<QueryCard />} />
            <Route path="/queryShop" element={<QueryShop />} />
            <Route path="/corpGuide" element={<CorpGuide />} />
            <Route path="/guide" element={<Guide />} />
            <Route path="/card/yum" element={<CardYum />} />
            <Route path="/faq" element={<Faq />} />
            <Route path="/rule/yum" element={<RuleYum />} />
            <Route path="/contract/yum" element={<ContractYum />} />
            <Route path="/contact" element={<Contact />} />
            <Route path="*" element={<Home />} /> {/* 添加404页面 */}
          </Routes>
          <Footer />
        </div>
      </Router>
    </>
  );
}

export default App;
